package com.ruoyi.consume.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.consume.mapper.BladeConsumeTemporaryMapper;
import com.ruoyi.consume.domain.BladeConsumeTemporary;
import com.ruoyi.consume.service.IBladeConsumeTemporaryService;

/**
 * 查看临时领用信息Service业务层处理
 *
 * @author ruoyi
 * @date 2021-07-27
 */
@Service
public class BladeConsumeTemporaryServiceImpl implements IBladeConsumeTemporaryService
{
    @Autowired
    private BladeConsumeTemporaryMapper bladeConsumeTemporaryMapper;

    /**
     * 查询查看临时领用信息
     *
     * @param bladeConsumeTemporaryId 查看临时领用信息ID
     * @return 查看临时领用信息
     */
    @Override
    public BladeConsumeTemporary selectBladeConsumeTemporaryById(Long bladeConsumeTemporaryId)
    {
        return bladeConsumeTemporaryMapper.selectBladeConsumeTemporaryById(bladeConsumeTemporaryId);
    }

    /**
     * 查询查看临时领用信息列表
     *
     * @param bladeConsumeTemporary 查看临时领用信息
     * @return 查看临时领用信息
     */
    @Override
    public List<BladeConsumeTemporary> selectBladeConsumeTemporaryList(BladeConsumeTemporary bladeConsumeTemporary)
    {
        return bladeConsumeTemporaryMapper.selectBladeConsumeTemporaryList(bladeConsumeTemporary);
    }

    /**
     * 新增查看临时领用信息
     *
     * @param bladeConsumeTemporary 查看临时领用信息
     * @return 结果
     */
    @Override
    public int insertBladeConsumeTemporary(BladeConsumeTemporary bladeConsumeTemporary)
    {
        bladeConsumeTemporary.setCreateTime(DateUtils.getNowDate());
        return bladeConsumeTemporaryMapper.insertBladeConsumeTemporary(bladeConsumeTemporary);
    }

    /**
     * 修改查看临时领用信息
     *
     * @param bladeConsumeTemporary 查看临时领用信息
     * @return 结果
     */
    @Override
    public int updateBladeConsumeTemporary(BladeConsumeTemporary bladeConsumeTemporary)
    {
        bladeConsumeTemporary.setUpdateTime(DateUtils.getNowDate());
        return bladeConsumeTemporaryMapper.updateBladeConsumeTemporary(bladeConsumeTemporary);
    }

    /**
     * 批量删除查看临时领用信息
     *
     * @param bladeConsumeTemporaryIds 需要删除的查看临时领用信息ID
     * @return 结果
     */
    @Override
    public int deleteBladeConsumeTemporaryByIds(Long[] bladeConsumeTemporaryIds)
    {
        return bladeConsumeTemporaryMapper.deleteBladeConsumeTemporaryByIds(bladeConsumeTemporaryIds);
    }

    /**
     * 删除查看临时领用信息信息
     *
     * @param bladeConsumeTemporaryId 查看临时领用信息ID
     * @return 结果
     */
    @Override
    public int deleteBladeConsumeTemporaryById(Long bladeConsumeTemporaryId)
    {
        return bladeConsumeTemporaryMapper.deleteBladeConsumeTemporaryById(bladeConsumeTemporaryId);
    }

    /**
     * 获取用户下拉框
     *
     * @param
     * @return 结果
     */
    @Override
    public List<BladeConsumeTemporary> getUserName(){
        return bladeConsumeTemporaryMapper.getUserName();
    }
}
